import request from '@/utils/request';


//统一的增删改查api,resourceurl为资源地址
export function Create(data,resourceurl) {
  return request({ url: `/${resourceurl}/`, method: 'post', data })
}
export function Update(data,resourceurl) {
  return request({ url: `/${resourceurl}/${data.id}/`, method: 'put', data })
}
export function Destroy(data,resourceurl) {
  return request({ url: `/${resourceurl}/${data.id}/`, method: 'delete', data })
}
export function List(params,resourceurl) {
  return request({ url: `/${resourceurl}/`, method: 'get', params})
}

// 获取客户编号
export function getClientNumber(params) {
  return request({ url: `/pbi_clients/number/`, method: 'get', params })
}